<?php 
// 添加页面
include './fun.php';
if($_POST){
	$data = $_POST;
	if (empty($data["username"])) {
		mistake('错误','用户名为空','./wicket.php',5);
		exit;
	}
	if (empty($data["content"])) {
		mistake('错误','内容为空','./wicket.php',5);
		exit;
	}
	
	$data['create_time']=time();
	$db = include './db.php';
	$db[]=$data;
	$db = var_export($db,true);
	$db = "<?php return ".$db."?>";
	file_put_contents('./db.php', $db);
	mistake('留言成功','正在','./wicket.php',1);
	// header("Location:./wicket.php");
}else{
	echo "0000";
}



 ?>